<!--
 * @Description: 分析页
 * @Author: wangqi
 * @Date: 2024-05-11 10:17:29
 * @LastEditTime: 2024-06-15 11:02:43
 * @LastEditAuthor: wangqi
-->
<template>
  <div class="p-4">
    <GrowCard :loading="loading" class="enter-y" />
    <SiteAnalysis class="!my-4 enter-y" :loading="loading" />
    <div class="md:flex enter-y">
      <VisitRadar class="md:w-1/3 w-full" :loading="loading" />
      <VisitSource class="md:w-1/3 !md:mx-4 !md:my-0 !my-4 w-full" :loading="loading" />
      <SalesProductPie class="md:w-1/3 w-full" :loading="loading" />
    </div>
  </div>
</template>
<script lang="ts" setup>
  import { ref, inject } from 'vue';
  import GrowCard from './components/GrowCard.vue';
  import SiteAnalysis from './components/SiteAnalysis.vue';
  import VisitSource from './components/VisitSource.vue';
  import VisitRadar from './components/VisitRadar.vue';
  import SalesProductPie from './components/SalesProductPie.vue';

  import { usePageContext } from '@/hooks/component/usePageContext';

  defineOptions({ name: 'Analysis' });

  const loading = ref(true);

  let pageContext = usePageContext();
  console.log(inject('APP_WQHASH'), 'usePageContext');
  console.log(pageContext, 'pageContext');

  setTimeout(() => {
    loading.value = false;
  }, 1500);
</script>

<style lang="less" scoped>
  .p-4 {
    .ref-test {
      height: 200px;

      :deep(.ant-card) {
        height: 100%;

        .ant-card-body {
          padding: 10px;
        }
      }
    }
  }
</style>
